package com.zq.englishlearnserve.controller;

import com.zq.englishlearnserve.common.entity.AjaxResult;
import com.zq.englishlearnserve.entity.User;
import com.zq.englishlearnserve.service.UserWordService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/words")
public class WordsController extends BaseController {

    @Autowired
    UserWordService userWordService;

    // 获取今天要背的单词
    @GetMapping("getPlanWords")
    public AjaxResult getPlanWords() {

        User loginUser = getLoginUser();
        userWordService.selectPlanWordsByUserId(loginUser.getId(), 20);

        return AjaxResult.success();
    }


}
